//---------------------------------------------------------------------------
#ifndef VM_MainH
#define VM_MainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <Dialogs.hpp>
#include <Menus.hpp>
#include <ExtCtrls.hpp>
#include "cgauges.h"
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
  TMainMenu *MainMenu1;
  TMenuItem *File1;
  TMenuItem *OpenROMfile1;
  TMenuItem *N1;
  TMenuItem *Exit1;
  TMenuItem *Program1;
  TMenuItem *Step1;
  TMenuItem *Run1;
  TOpenDialog *FOpen1;
  TMenuItem *OpenPointerFile1;
  TMenuItem *OpenTablefile1;
  TListBox *vmPointers;
  TMemo *vmText;
  TMenuItem *N2;
  TMenuItem *SaveTexttoafile1;
  TSaveDialog *FSave1;
  TMenuItem *N3;
  TMenuItem *Dumpallscriptstotextfiles1;
  TCGauge *CGBar;
  TMenuItem *FindInternalScripts1;
  TMenuItem *View1;
  TMenuItem *DisplayKanaData1;
  void __fastcall Exit1Click(TObject *Sender);
  void __fastcall OpenROMfile1Click(TObject *Sender);
  void __fastcall Step1Click(TObject *Sender);
  void __fastcall Run1Click(TObject *Sender);
  
  void __fastcall FormCreate(TObject *Sender);
  void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  void __fastcall OpenPointerFile1Click(TObject *Sender);
  void __fastcall vmPointersDblClick(TObject *Sender);
  void __fastcall OpenTablefile1Click(TObject *Sender);
  void __fastcall SaveTexttoafile1Click(TObject *Sender);
  void __fastcall Dumpallscriptstotextfiles1Click(TObject *Sender);
  void __fastcall FindInternalScripts1Click(TObject *Sender);
  void __fastcall DisplayKanaData1Click(TObject *Sender);
private:	// User declarations
public:		// User declarations
  __fastcall TForm1(TComponent* Owner);

  LONG __fastcall VirtuaMachine( );
  LONG __fastcall VirtuaMachineDump( );

  AnsiString __fastcall HexStr( LONG lpOffset, LONG lpCount );
  void __fastcall DecodeTextData( LONG lpOffset );

  bool isRunning;
  AnsiString vmTextData;

};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif






